<!--#
 @version 0.2 (auto-set)
#-->

<!-- Table 'patterns' edit -->
<p align=center>
 <a href="?">&lt;&lt;&lt; <#LANG_BACK#></a>
</p>
<table border=0 align=center cellpadding=3>
<form action="?" method="post" enctype="multipart/form-data" name="frmEdit">
[#if OK#]
<tr>
 <td colspan=2 align=center>
  <font color="green"><#LANG_DATA_SAVED#></font>
 </td>
</tr>
[#endif OK#]
[#if ERR#]
<tr>
 <td colspan=2 align=center>
  <font color="red"><#LANG_FILLOUT_REQURED#></font>
 </td>
</tr>
[#endif ERR#]
[#if ID=""#]
<tr>
 <td colspan=2 align=center><b><#LANG_NEW_RECORD#></b></td>
</tr>
[#endif ID#]
<!-- TITLE (varchar) -->
<tr>
 <td align=right>
 [#if ERR_TITLE#]<b><font color="red">[#endif#]
 <#LANG_TITLE#>:
 (*)
 </td>
 <td>
  <input type="text" name="title" value="[#TITLE#]" size="50">
 </td>
</tr>
<!-- PATTERN (text) -->
<tr>
 <td valign=top align=right>
 [#if ERR_PATTERN#]<b><font color="red">[#endif#]
 <#LANG_PATTERN#>
 :
 </td>
 <td valign=top>
 <textarea name="pattern" rows=12 cols=100 class="field span8">[#PATTERN#]</textarea>
 </td>
</tr>

<!-- TIME_LIMIT (int) -->
<tr>
 <td align=right>
 [#if ERR_TIME_LIMIT#]<b><font color="red">[#endif#]
 <#LANG_TIME_LIMIT#>, <#LANG_SECONDS#>:
 </td>
 <td>
  <input type="text" name="time_limit" value="[#TIME_LIMIT#]"> (set 0 to be used with the latest log record only)
 </td>
</tr>


 <tr>
  <td valign="top" align="right"><#LANG_EXECUTE_ON_MATCH#>:</td>
  <td valign="top">
  <input type="radio" name="run_type" value="script"[#if SCRIPT_ID!="0"#] checked[#endif#]> <#LANG_SCRIPT#>:
   <select name="script_id">
    <option value="0">
    [#begin SCRIPTS#]
        <option value="[#ID#]"[#if ID="<#SCRIPT_ID#>"#] selected[#endif#]>[#TITLE#]
        [#end SCRIPTS#]
   </select>    
   <br>
   <input type="radio" name="run_type" value="code"[#if SCRIPT_ID="0"#] checked[#endif#]> <#LANG_CODE#>:<br>
 [#if ERRORS!=""#]
 <font color='red'>[#ERRORS#]</font><br>
 [#endif ERRORS#]  
  <textarea name="script"  rows=12 cols=100 class="field span8">[#SCRIPT#]</textarea></td>
 </tr>
<tr>
 <td colspan=2 align=center>
 [#if ID!=""#]
 <input type="submit" name="subm" value="<#LANG_SUBMIT#>">
 [#else ID#]
 <input type="submit" name="subm" value="<#LANG_ADD#>">
 [#endif ID#]
 &nbsp;
 <a href="?"><#LANG_CANCEL#></a>
 </td>
</tr>
<input type="hidden" name="id" value="<#ID#>">
<input type="hidden" name="view_mode" value="<#VIEW_MODE#>">
<input type="hidden" name="edit_mode" value="<#EDIT_MODE#>">
<input type="hidden" name="mode" value="update">
</form>

[#if LOG!=""#]
<tr>
 <td align=right valign="top">
  LOG:
 </td>
 <td>
  [#LOG#]
 </td>
</tr>
[#endif#]


</table>
